import request from '@/utils/request'
export default{
    getSysRolePageList(pageNum,pageSize,searchObj) {
        return request({
          url: `/system/role/getSysRolePageList/${pageNum}/${pageSize}`,
          method: 'post',
          data: searchObj
        })
    },
    saveRole(role){
        return request({
            url: `/system/role/insertRole`,
            method: 'post',
            data: role
          })
    },
    getRoleById(id){
        return request({
            url: `/system/role/getRoleById/${id}`,
            method: 'get',
          })
    },
    updateRole(role){
        return request({
            url: `/system/role/updateRole`,
            method: 'post',
            data:role
          })
    },
    removeRoleById(id){
        return request({
            url: `/system/role/removeRoleById/${id}`,
            method: 'delete',
          })

    },
    batchRemove(idList) {
      return request({
        url: `/system/role/removeBatch`,
        method: `delete`,
        data: idList
      })
    },
    updateRoleStatus(roleId,status) {
      return request({
        url: `/system/role/updateRoleStatus/${roleId}/${status}`,
        method: `get`,
      })
    },
    toAssign(roleId) {
      return request({
        url: `/system/role/toAssign/${roleId}`,
        method: `get`,
      })
    },
    doAssign(assignMenuDTO) {
      return request({
        url: `/system/role/doAssign`,
        method: `post`,
        data: assignMenuDTO
      })
    },
}
    